package com.seu.me.test;

import org.joda.time.DateTime;

import java.util.Date;

/**
 * Created by liangfeihu on 2018/2/8.
 */
public class MyTest2 {

    public static void main(String[] args) {
        /*Map<String, Boolean> effectiveMap = new HashMap<>();
        effectiveMap.put("liangfeihu", Boolean.TRUE);
        Boolean isExist = effectiveMap.get("liangfeihu");
        System.out.println(isExist);
        System.out.println(!isExist);

        StringBuilder sql = new StringBuilder();
        sql.append(String.format("welcome to my '%s'", "home"));
        System.out.println(sql.toString());

        Long v1 = Long.valueOf("789654123");
        Long v2 = Long.valueOf("789654123");
        System.out.println(v1.equals(v2));*/

        /*String bill = "{\"usd_cash_amount\":0,\"point_adjust\":0,\"bill_date\":\"2017-08-10T00:00:00.000+08\",\"last_modify_time\":\"2018-01-30T14:05:44.000+08\",\"mail_sender\":\"liangfhhd@163.com\",\"min_payment\":1799.38,\"new_charges\":0,\"usd_past_due_amount\":0,\"point_reward\":0,\"feature_point\":0,\"usd_adjustment\":0,\"bank_id\":5,\"last_payment\":1983.45,\"bill_id\":\"8349151819104706189_137879506\",\"usd_last_balance\":0,\"mail_id\":\"8349151819104706189_143746404\",\"usd_credit_limit\":0,\"create_time\":\"2018-01-30T14:05:44.000+08\",\"card_number\":\"7450\",\"failure_point\":0,\"voucher_valid_date\":\"1900-01-01T00:00:00.000+08\",\"usd_last_payment\":0,\"currency_type\":1,\"usd_cash_limit\":0,\"point_add\":0,\"payment_due_date\":\"2017-08-30T00:00:00.000+08\",\"adjustment\":0,\"status\":0,\"email_id\":\"8349151819104706189\",\"last_balance\":1975.75,\"usd_interest\":0,\"cash_amount\":0,\"usd_new_charges\":0,\"point_valid_date3\":\"2018-01-30T14:05:44.000+08\",\"point_valid_date2\":\"2018-01-30T14:05:44.000+08\",\"point\":0,\"interest\":0,\"credit_limit\":36000,\"new_balance\":2039.76,\"shopping_sheets\":[{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-07-10T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-07-11T00:00:00.000+08\",\"bank_id\":5,\"description\":\"深圳市财付通科技有限公司\",\"amount_money\":11.38,\"trans_addr\":\"\",\"trans_org_amount\":11.38,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-07-12T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-07-13T00:00:00.000+08\",\"bank_id\":5,\"description\":\"北京钱袋宝支付技术有限公司\",\"amount_money\":15.88,\"trans_addr\":\"\",\"trans_org_amount\":15.88,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-07-15T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-07-16T00:00:00.000+08\",\"bank_id\":5,\"description\":\"美团点评\",\"amount_money\":23,\"trans_addr\":\"\",\"trans_org_amount\":23,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-07-30T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-07-30T00:00:00.000+08\",\"bank_id\":5,\"description\":\"约定还款9278\",\"amount_money\":-69.04,\"trans_addr\":\"\",\"trans_org_amount\":-69.04,\"trans_type\":\"PAYMENTS\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-07-30T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-07-30T00:00:00.000+08\",\"bank_id\":5,\"description\":\"手机银行一键转账还款9278\",\"amount_money\":-1906.71,\"trans_addr\":\"\",\"trans_org_amount\":-1906.71,\"trans_type\":\"PAYMENTS\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-07-30T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-07-30T00:00:00.000+08\",\"bank_id\":5,\"description\":\"财付通-微信支付（Tenpay）：光明便\",\"amount_money\":7.7,\"trans_addr\":\"\",\"trans_org_amount\":7.7,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-07-30T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-07-30T00:00:00.000+08\",\"bank_id\":5,\"description\":\"财付通-微信支付（Tenpay）：光明便\",\"amount_money\":7.7,\"trans_addr\":\"\",\"trans_org_amount\":7.7,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-07-30T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-07-30T00:00:00.000+08\",\"bank_id\":5,\"description\":\"财付通\",\"amount_money\":-7.7,\"trans_addr\":\"\",\"trans_org_amount\":-7.7,\"trans_type\":\"PAYMENTS\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-07-30T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-07-30T00:00:00.000+08\",\"bank_id\":5,\"description\":\"支付宝-杭州晨熹多媒体科技有限公司\",\"amount_money\":30.8,\"trans_addr\":\"\",\"trans_org_amount\":30.8,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-07-31T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-07-31T00:00:00.000+08\",\"bank_id\":5,\"description\":\"财付通-微信支付（Tenpay）：滴滴出\",\"amount_money\":31.45,\"trans_addr\":\"\",\"trans_org_amount\":31.45,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-08-01T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-08-02T00:00:00.000+08\",\"bank_id\":5,\"description\":\"财付通-微信支付（Tenpay）：永辉会\",\"amount_money\":25.2,\"trans_addr\":\"\",\"trans_org_amount\":25.2,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-08-05T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-08-05T00:00:00.000+08\",\"bank_id\":5,\"description\":\"财付通-微信支付（Tenpay）：美团/\",\"amount_money\":18.88,\"trans_addr\":\"\",\"trans_org_amount\":18.88,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-08-05T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-08-06T00:00:00.000+08\",\"bank_id\":5,\"description\":\"美团点评\",\"amount_money\":36,\"trans_addr\":\"\",\"trans_org_amount\":36,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-08-06T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-08-06T00:00:00.000+08\",\"bank_id\":5,\"description\":\"支付宝-杭州晨熹多媒体科技有限公司\",\"amount_money\":30.8,\"trans_addr\":\"\",\"trans_org_amount\":30.8,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-08-06T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-08-07T00:00:00.000+08\",\"bank_id\":5,\"description\":\"财付通-微信支付（Tenpay）：汉堡王\",\"amount_money\":23,\"trans_addr\":\"\",\"trans_org_amount\":23,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-08-09T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-08-10T00:00:00.000+08\",\"bank_id\":5,\"description\":\"财付通-微信支付（Tenpay）：中信银\",\"amount_money\":13,\"trans_addr\":\"\",\"trans_org_amount\":13,\"trans_type\":\"SHOPPING\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-08-10T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-08-10T00:00:00.000+08\",\"bank_id\":5,\"description\":\"现金分期单期金额:分期9/12\",\"amount_money\":1666.67,\"trans_addr\":\"\",\"trans_org_amount\":1666.67,\"trans_type\":\"INSTALLMENT\",\"status\":false},{\"bill_id\":\"8349151819104706189_137879506\",\"trans_date\":\"2017-08-10T00:00:00.000+08\",\"card_no\":\"7450\",\"currency_type\":1,\"post_date\":\"2017-08-10T00:00:00.000+08\",\"bank_id\":5,\"description\":\"现金分期每月手续费\",\"amount_money\":106,\"trans_addr\":\"\",\"trans_org_amount\":106,\"trans_type\":\"INSTALLMENT\",\"status\":false}],\"voucher_balance\":0,\"bill_start_date\":\"2017-07-11T00:00:00.000+08\",\"original\":\"1\",\"point_lose_date\":\"2018-01-30T00:00:00.000+08\",\"past_due_amount\":0,\"cash_limit\":18000,\"usd_new_balance\":0,\"point_travel\":0,\"feature_point_add\":0,\"point_used\":0,\"usd_min_payment\":0,\"last_point\":0,\"point_valid_date\":\"1900-01-01T00:00:00.000+08\",\"name_on_card\":\"梁飞虎\"}";
        JSONObject object = JSONObject.parseObject(bill);
        System.out.println(new DateTime(object.getDate("bill_date")).toString("yyyy-MM-dd"));*/

        /*Date day = new Date();
        DateTime time = new DateTime(day.getTime());
        System.out.println("day=" + time.getDayOfMonth() + ", long=" + day.getTime());
        System.out.println("time=" + time.toString("yyyy-MM-dd"));

        System.out.println("creditDiagnosisNew".endsWith("New"));
        System.out.println("creditDiagnosis".endsWith("New"));*/

        DateTime times = new DateTime(new Date());
        /*String batchdate = times.toString("yyyy/MM/dd");
        System.out.println("batchdate=" + batchdate);

        for (int i = 0; i < 20; i ++) {
            String batchday = times.minusDays(i).toString("yyyy/MM/dd");
            String amt = i * 5 + ".00";
            String sql = "update `acct_payment_schedule` set `payprincipalpenaltyamt` = '" + amt + "' WHERE `paydate` = '"
                    + batchday + "' and `finishdate` IS NULL and `payprincipalpenaltyamt` != '" + amt + "' ";
            System.out.println("sql=" + sql);
        }*/

        //times.isAfter(null);
        System.out.println(System.currentTimeMillis());
        //DateTime now = new DateTime(1526527127805L);
        DateTime now = new DateTime("2018-12-13");
        System.out.println(now.toString("yyyy/MM/dd"));

        String phones = "15193320978,15202583143,15290464280,13756547984,18434865374,13732459826";
        System.out.println(phones.contains("13756547984"));
        System.out.println(phones.contains("15202583143,"));

    }

}
